package com.xuchaotong.redis;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import redis.clients.jedis.Jedis;

/**
 * Created by 357070 on 2017/4/11.
 */
public class PubMain {
    public static final String CHANNEL_NAME = "MyChannel";

    public static void main(String[] args) throws Exception {
        final Jedis publisherJedis = RedisClient.getInstance().getJedis();

        //主线程：发布消息到CHANNEL_NAME频道上
        new Publisher(publisherJedis, CHANNEL_NAME).startPublish();
        publisherJedis.close();
    }
}
